function startMove(domobj, json, fn) {
    //{width:300,height:300}
    clearInterval(domobj.timer);
    domobj.timer = setInterval(function() {
        //假设所有的属性都达到了目标值
        var flag = true;
        for (var attr in json) {
            var iTar = json[attr]; //目标值
            var iCur = 0;
            if (attr == "opacity") {
                iCur = parseInt(getStyle(domobj, "opacity") * 100);
            } else {
                iCur = parseInt(getStyle(domobj, attr));
            }
            var iSpeed = (iTar - iCur) / 8;
            iSpeed = iSpeed > 0 ? Math.ceil(iSpeed) : Math.floor(iSpeed);
            //设置样式
            if (attr == "opacity") {
                domobj.style.opacity = (iCur + iSpeed) / 100;
                domobj.style.filter = "alpha(opacity=" + (iCur + iSpeed) + ")";
            } else {
                domobj.style[attr] = iCur + iSpeed + "px";
            }

            if (iCur != iTar) {
                flag = false; //只要一个属性没有达到目标值，假设不成立
            }
        }
        if (flag) {
            clearInterval(domobj.timer);
            if (fn) {
                fn();
            }
        }
    }, );
}

function getStyle(domobj, attr) {
    if (window.getComputedStyle) {
        return getComputedStyle(domobj, null)[attr];
    }
    return domobj.currentStyle[attr];
}